<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>线下优惠券</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="137660897">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "137660897";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("offlinecoupon.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建线下优惠券"
  			,"inport":"导入线下优惠券"
  			,"update":"修改线下优惠券"
  			,"detail":"线下优惠券详情"
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#offlinecouponForm").form({
		"":function(){}
		,"offlineCoupon.id":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"offlineCoupon.merchant":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"offlineCoupon.commodity":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"offlineCoupon.discount":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
				var pattern = /^-?(([1-9]\d{0,9})|0)?(\.)?(\d+)?/;
				if(el.value!="" && !pattern.test(el.value))
					return "折扣输入格式错误";
		}
		,"offlineCoupon.termValidity":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "有效期不能为空";
			}
		}
		,"offlineCoupon.usageRule":function(el){
			if(el.value.length>225 && el.value.indexOf("[*]")==-1)
				return "使用规则最大长度为225个字符";
		}
		,"offlineCoupon.receiveCode":function(el){
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "领取码最大长度为32个字符";
			if(jQuery.trim(el.value)!=""){
				var protocol = $.getAjax("offlinecoupon.query.do",{exists:true,receiveCode:el.value});
				if(protocol.success && protocol.data.list && protocol.data.list.length>0){
					if(!$("#id").val() || protocol.data.list[0].key!=$("#id").val())
						return "领取码已存在";						
				}
			}
		}
		,"offlineCoupon.qrCode":function(el){
		}
		,"offlineCoupon.receivingSituation":function(el){
		}
		,"offlineCoupon.updateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"offlineCoupon.addTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"offlineCoupon.status":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>


<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="OfflineCoupon" id="offlinecouponForm" name="offlinecouponForm" target="jsoniframe" action="offlinecoupon.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt" style="display:none;">
				温馨提示：请仔细填写线下优惠券相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
	{{lz.set("id_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"id"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"id"))))}}
	{{lz.set("id_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$id}}
	<dl lz:if="{{id_editable||id_readonly}}" class="id hidden " major  ref="id">
		<dt>编　　号:</dt>
		<dd lz:if="{{id_editable}}" input="hidden">
			<lz:block lz:if="{{offlineCoupon$id}}">
				{{offlineCoupon$id}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$id}}">
			<input type="hidden" value="{{lz.htm(offlineCoupon.id)}}" name="offlineCoupon.id" id="id" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{id_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="id">{{offlineCoupon.id}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.id$||offlineCoupon.id)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$id}}
	{{lz.set("merchant_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"merchant"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"merchant"))))}}
	{{lz.set("merchant_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$merchant}}
	<dl lz:if="{{merchant_editable||merchant_readonly}}" class="merchant  " major  ref="merchant">
		<dt>所属品牌:</dt>
		<dd lz:if="{{merchant_editable}}" input="query">
			<lz:block lz:if="{{offlineCoupon$merchant}}">
				{{offlineCoupon$merchant}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$merchant}}">
		 			<input title="请输入品牌信息品牌名称进行查询" class="combox narrow" action="/admin/business/merchant.query.do?value={param}" type="text" id="merchant" name="offlineCoupon.merchant" text="{{lz.html(offlineCoupon.merchant$||offlineCoupon.merchant)}}" value="{{lz.htm(offlineCoupon.merchant)}}" />
		 			<a class="lookup" href="javascript:void(0);" onclick="if($.trim($('#merchant').val())==''){return;};window.href('/admin/business/merchant.detail.html?key='+$('#merchant').val())"></a>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{merchant_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="merchant">{{offlineCoupon.merchant}}</textarea>
		 		<span>
		 	
			 <a href="javascript:void(0);" onclick="window.href('/admin/business/merchant.details.html?key=offlineCoupon.merchant}')">
			 {{lz.html(offlineCoupon.merchant$||offlineCoupon.merchant)}}</a>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$merchant}}
	{{lz.set("commodity_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"commodity"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"commodity"))))}}
	{{lz.set("commodity_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$commodity}}
	<dl lz:if="{{commodity_editable||commodity_readonly}}" class="commodity  " major  ref="commodity">
		<dt>适用商品:</dt>
		<dd lz:if="{{commodity_editable}}" input="query">
			<lz:block lz:if="{{offlineCoupon$commodity}}">
				{{offlineCoupon$commodity}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$commodity}}">
		 			<input title="请输入商品信息商品名称进行查询" class="combox narrow" action="/admin/goods/commodity.query.do?value={param}" type="text" id="commodity" name="offlineCoupon.commodity" text="{{lz.html(offlineCoupon.commodity$||offlineCoupon.commodity)}}" value="{{lz.htm(offlineCoupon.commodity)}}" />
		 			<a class="lookup" href="javascript:void(0);" onclick="if($.trim($('#commodity').val())==''){return;};window.href('/admin/goods/commodity.detail.html?key='+$('#commodity').val())"></a>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{commodity_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="commodity">{{offlineCoupon.commodity}}</textarea>
		 		<span>
		 	
			 <a href="javascript:void(0);" onclick="window.href('/admin/goods/commodity.details.html?key=offlineCoupon.commodity}')">
			 {{lz.html(offlineCoupon.commodity$||offlineCoupon.commodity)}}</a>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$commodity}}
	{{lz.set("discount_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"discount"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"discount"))))}}
	{{lz.set("discount_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$discount}}
	<dl lz:if="{{discount_editable||discount_readonly}}" class="discount  " major  ref="discount">
		<dt>折　　扣:</dt>
		<dd lz:if="{{discount_editable}}" input="menoy">
			<lz:block lz:if="{{offlineCoupon$discount}}">
				{{offlineCoupon$discount}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$discount}}">
		 	<input onchange="onkeyup()" onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?(\.)?(\d+)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="offlineCoupon.discount" id="discount"  value="{{lz.htm(offlineCoupon.discount)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>最大设9.9折 不能大于等于10  也不能为负数</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{discount_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="discount">{{offlineCoupon.discount}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.discount$||offlineCoupon.discount)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$discount}}
	{{lz.set("termValidity_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"termValidity"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"termValidity"))))}}
	{{lz.set("termValidity_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$termValidity}}
	<dl lz:if="{{termValidity_editable||termValidity_readonly}}" class="termValidity  " major  ref="termValidity">
		<dt>有 效 期:</dt>
		<dd lz:if="{{termValidity_editable}}" input="date">
			<lz:block lz:if="{{offlineCoupon$termValidity}}">
				{{offlineCoupon$termValidity}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$termValidity}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" type="text" class="date input narrow" maxlength="19" name="offlineCoupon.termValidity" id="termValidity"  value="{{offlineCoupon.termValidity$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择线下优惠券的有效期</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{termValidity_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="termValidity">{{offlineCoupon.termValidity}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.termValidity$||offlineCoupon.termValidity)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$termValidity}}
	{{lz.set("usageRule_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"usageRule"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"usageRule"))))}}
	{{lz.set("usageRule_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$usageRule}}
	<dl lz:if="{{usageRule_editable||usageRule_readonly}}" class="ribs usageRule   wider" minor  ref="usageRule">
		<dt>使用规则:</dt>
		<dd lz:if="{{usageRule_editable}}" input="textarea">
			<lz:block lz:if="{{offlineCoupon$usageRule}}">
				{{offlineCoupon$usageRule}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$usageRule}}">
		 	<textarea class="input wide"  id="usageRule" name="offlineCoupon.usageRule" rows="5">{{offlineCoupon.usageRule}}</textarea>
	 	 </lz:block>
	 	 
	 	 <em>请输入线下优惠券的使用规则</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{usageRule_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(offlineCoupon.usageRule$||offlineCoupon.usageRule)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$usageRule}}
	{{lz.set("receiveCode_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"receiveCode"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"receiveCode"))))}}
	{{lz.set("receiveCode_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$receiveCode}}
	<dl lz:if="{{receiveCode_editable||receiveCode_readonly}}" class="ribs receiveCode  " major  ref="receiveCode">
		<dt>领 取 码:</dt>
		<dd lz:if="{{receiveCode_editable}}" input="text">
			<lz:block lz:if="{{offlineCoupon$receiveCode}}">
				{{offlineCoupon$receiveCode}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$receiveCode}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="offlineCoupon.receiveCode" id="receiveCode"  value="{{lz.htm(offlineCoupon.receiveCode)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入线下优惠券的领取码</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{receiveCode_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="receiveCode">{{offlineCoupon.receiveCode}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.receiveCode$||offlineCoupon.receiveCode)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$receiveCode}}
	{{lz.set("qrCode_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"qrCode"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"qrCode"))))}}
	{{lz.set("qrCode_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$qrCode}}
	<dl lz:if="{{qrCode_editable||qrCode_readonly}}" class="ribs qrCode   wider" major  ref="qrCode">
		<dt>二 维 码:</dt>
		<dd lz:if="{{qrCode_editable}}" input="image">
			<lz:block lz:if="{{offlineCoupon$qrCode}}">
				{{offlineCoupon$qrCode}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$qrCode}}">
		    <input type="text" class="input" maxlength="128" size="32" name="offlineCoupon.qrCode" id="qrCode"  value="{{lz.htm(offlineCoupon.qrCode)}}"/>
			<button type="button" onclick="$.upload({type:'img',callback:function(url){if(url)$('#qrCode').val(url)}})" class="button">设置图片</button>
			<button type="button" onclick="$('#qrCode').val('')" class="button">删除图片</button>
			<button type="button" onclick="$.thumb({url:$('#qrCode').val()})" class="button">查看图片</button>
	 	 </lz:block>
	 	 
	 	 <em>请上传线下优惠券的二维码</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{qrCode_readonly}}">
		 	<div class="state-input wide">
		 		<textarea class=""  style="display:none;" id="qrCode">{{offlineCoupon.qrCode}}</textarea>
		 		<span>
		 	<img lz:if="{{offlineCoupon.qrCode}}" onclick="$.thumb({url:this.src})" style="margin:10px;padding:1px;border:1px solid;" onload="if(this.width>this.height){this.width=96}else{this.height=96}" src="{{lz.htm(offlineCoupon.qrCode)}}"/>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$qrCode}}
	{{lz.set("receivingSituation_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"receivingSituation"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"receivingSituation"))))}}
	{{lz.set("receivingSituation_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$receivingSituation}}
	<dl lz:if="{{receivingSituation_editable||receivingSituation_readonly}}" class="ribs receivingSituation  " major  ref="receivingSituation">
		<dt>领取情况:</dt>
		<dd lz:if="{{receivingSituation_editable}}" input="select">
			<lz:block lz:if="{{offlineCoupon$receivingSituation}}">
				{{offlineCoupon$receivingSituation}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$receivingSituation}}">
		 	<select class="narrow" id="receivingSituation" name="offlineCoupon.receivingSituation">
		 		<option value="">请选择</option>
				<option value="1" selected='{{offlineCoupon.receivingSituation=="1"?"selected":""}}'>未领取</option>
				<option value="2" selected='{{offlineCoupon.receivingSituation=="2"?"selected":""}}'>已领取</option>
		 	</select>
	 	 </lz:block>
	 	 
	 	 <em>请选择线下优惠券的领取情况</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{receivingSituation_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="receivingSituation">{{offlineCoupon.receivingSituation}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.receivingSituation$||offlineCoupon.receivingSituation)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$receivingSituation}}
	{{lz.set("updateTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"updateTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"updateTime"))))}}
	{{lz.set("updateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$updateTime}}
	<dl lz:if="{{updateTime_editable||updateTime_readonly}}" class="updateTime  " major  ref="updateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{updateTime_editable}}" input="datetime">
			<lz:block lz:if="{{offlineCoupon$updateTime}}">
				{{offlineCoupon$updateTime}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$updateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="offlineCoupon.updateTime" id="updateTime"  value="{{offlineCoupon.updateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择线下优惠券的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{updateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="updateTime">{{offlineCoupon.updateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.updateTime$||offlineCoupon.updateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$updateTime}}
	{{lz.set("addTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"addTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"addTime"))))}}
	{{lz.set("addTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$addTime}}
	<dl lz:if="{{addTime_editable||addTime_readonly}}" class="addTime  " major  ref="addTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{addTime_editable}}" input="datetime">
			<lz:block lz:if="{{offlineCoupon$addTime}}">
				{{offlineCoupon$addTime}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$addTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="offlineCoupon.addTime" id="addTime"  value="{{offlineCoupon.addTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择线下优惠券的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{addTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="addTime">{{offlineCoupon.addTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.addTime$||offlineCoupon.addTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$addTime}}
	{{lz.set("status_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"status"))))&&false)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"status"))))}}
	{{lz.set("status_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$status}}
	<dl lz:if="{{status_editable||status_readonly}}" class="status  " major  ref="status">
		<dt>状　　态:</dt>
		<dd lz:if="{{status_editable}}" input="select">
			<lz:block lz:if="{{offlineCoupon$status}}">
				{{offlineCoupon$status}}
			</lz:block>
			<lz:block lz:if="{{!offlineCoupon$status}}">
		 	<select class="narrow" id="status" name="offlineCoupon.status">
		 		<option value="">请选择</option>
				<option value="0" selected='{{offlineCoupon.status=="0"?"selected":""}}'>待扫码</option>
				<option value="1" selected='{{offlineCoupon.status=="1"?"selected":""}}'>已领取</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择线下优惠券的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{status_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="status">{{offlineCoupon.status}}</textarea>
		 		<span>
		 	
			 {{lz.html(offlineCoupon.status$||offlineCoupon.status)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$status}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{offlineCoupon.id}}" name="offlineCoupon.id" id="id" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/coupons/offlinecoupon.edit.html?edittype=update&id={{offlineCoupon.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>

 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/coupons/offlinecoupon.edit.html",document.title,"/admin//images/icons/Billing.png");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/coupons/offlinecoupon.edit.html");
		}else{
			$.closeModalDialog();
		}
	}


</script>
</html>